<template>
  <div class="func-comp-form">

    <ComponentGlobalSettingForm :id="id" :compConfigData="compConfigData"></ComponentGlobalSettingForm>

    <Tabs name="main_tabs" size="small" v-model="mainTabsValue">
      <!--<TabPane name="main_tab" tab="main_tabs" label="主配置">

        <Tabs name="main_tabs_child">
          <TabPane tab="main_tabs_child" label="基础配置">

            <Form :label-width="100">
              <FormItem label="标题">
                <Input size="small" v-model="title" placeholder=""/>
              </FormItem>
            </Form>

          </TabPane>
          <TabPane tab="main_tabs_child" label="...">

          </TabPane>
        </Tabs>

      </TabPane>-->
      <TabPane name="datasource_tab" tab="main_tabs" label="数据源">
        <DatasourceState v-if="mainTabsValue == 'datasource_tab'" targetComp="RichTextViewComp"></DatasourceState>
      </TabPane>
      <TabPane name="interaction_tab" tab="main_tabs" label="交互">
        <Container v-if="mainTabsValue == 'interaction_tab'">
          <CustomJsDocument></CustomJsDocument>
          <FormItemPanel title="初始化运行脚本">
            <CodeEditor v-model="customGlobalJsCode"></CodeEditor>
          </FormItemPanel>

        </Container>
      </TabPane>
    </Tabs>

  </div>
</template>

<script>

  import FuncCompFormMixin from '@/mixin/FuncCompFormMixin'

  import { createHelpers } from 'vuex-map-fields';

  const { mapFields } = createHelpers({
    getterType: 'designer/getLayoutItem',
    mutationType: 'designer/updateLayoutItem',
  });

  export default {
    name: 'RichTextViewCompForm', // 此名称必须填写，且必须与组件文件名相同，并且必须加上Form字符
    mixins: [FuncCompFormMixin],
    data() {
      return {}
    },
    mounted() {
      this.mainTabsValue = 'datasource_tab'
    },
    methods: {},
    computed: {
      ...mapFields({



      })
    }
  }
</script>

<style scoped>

</style>
